/**
 * Copyright 2011 Software in Life Inc. All rights reserved.
 */
package com.softwareinlife.snaf.user.model;

import java.util.Date;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author Jang, Sun-Jin(jangsunjin@softwareinlife.com)
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.FIELD)
public class UserModel {

	/**
	 * User ID
	 */
	@PrimaryKey
	@Persistent
	private String userId;

	/**
	 * Created Date
	 */

	private Date createdDate;

	/**
	 * Constructor
	 */
	public UserModel() {
		super();

		createdDate = new Date();
	}

	/**
	 * Constructor
	 * 
	 * @param userId
	 */
	public UserModel(String userId) {
		super();
		this.userId = userId;
		createdDate = new Date();
	}

	/**
	 * @return the userId
	 */
	public String getUserId() {
		return userId;
	}

	/**
	 * @param userId
	 *            the userId to set
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * @return the createdDate
	 */
	public Date getCreatedDate() {
		return createdDate;
	}

	/**
	 * @param createdDate
	 *            the createdDate to set
	 */
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "UserModel [userId=" + userId + ", createdDate=" + createdDate
				+ "]";
	}
}
